import React,{Component} from 'react'
import {connect} from 'react-redux';
import {RecommendBox,RecommendItem} from '../style'
class Recommend extends Component{
    constructor(){
        super();
    }
    render(){
        return(
            <React.Fragment>
                <RecommendBox>

                    {
                        this.props.recommendList.map((item,index)=>{
                            return(
                                <RecommendItem imgSrc={item.get('src')} key={index}></RecommendItem>
                            )
                        })
                    }
                   
                </RecommendBox>
            </React.Fragment>
        )
     }
}
const mapStateToProps = (state)=>{
    return{
        recommendList:state.get('home').get('recommendList')
    }
}
export default connect(mapStateToProps,null)(Recommend);